home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 009a / drvrdy.zip / DRVTEST.C < prev    next >
C/C++ Source or Header  |  1990-12-27  |  654b  |  38 lines

  1.  
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6.  
  7. /* Code to test the floppy_rdy function ...                 */
  8. /* Execute program drvrdy.exe with a floppy in drive 'A',   */
  9. /* then open the door and try it again.                     */
  10.  
  11.  
  12. void main(int argc, char *argv[]);
  13.  
  14. void main(int argc, char *argv[])
  15.  
  16. {
  17.  
  18. char    str[120];
  19.  
  20. if (argc > 1)
  21.   {
  22.   strcpy(str, argv[1]);
  23.   strupr(str);
  24.   }
  25. else
  26.   {
  27.   printf("Enter the driver letter of the disk drive to test if ready ? ");
  28.   gets(str);
  29.   strupr(str);
  30.   }
  31.  
  32.  
  33. printf("Drive '%s' is ", str);
  34. if (!floppy_rdy(*str)) printf("NOT ");
  35. printf("ready\n");
  36.  
  37. }
  38.